package com.twang.stock.controller.old;

import com.twang.stock.entity.HotTag;
import com.twang.stock.enmu.HotTagEnum;
import com.twang.stock.service.jinyan.QinXUZhiShuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * 指标
 */
@Controller
@RequestMapping(value = "/tag")
@Slf4j
public class StockTagController {
    @Autowired
    private QinXUZhiShuService qinXUZhiShuService;

    /**
     * 生成财报
     *
     * @return
     * @throws Exception
     */
    @GetMapping(value = "/query")
    @ResponseBody
    public ModelAndView getZhangDie(String code){
        ModelAndView modelAndView=new ModelAndView();
        List<HotTag> hotTags= qinXUZhiShuService.queryListByTag(HotTagEnum.Core_1);
        modelAndView.setViewName("table_tag");
        modelAndView.addObject("list", hotTags);
        return modelAndView;
    }

}
